/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #ffeef8 0%, #ffe0f0 50%, #ffd6eb 100%);
    min-height: 100vh;
    color: #8b5a6b;
    overflow-x: hidden;
}

/* 背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 182, 193, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 192, 203, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 218, 224, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* 标题区域 */
.header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 0.8s ease-out;
}

.title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #d63384;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(214, 51, 132, 0.1);
}

.subtitle {
    font-size: 1rem;
    color: #8b5a6b;
    opacity: 0.8;
}

/* 转盘容器 */
.wheel-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.wheel-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(214, 51, 132, 0.2),
        0 0 0 8px rgba(255, 255, 255, 0.8),
        0 0 0 12px rgba(214, 51, 132, 0.1);
    transition: transform 3s cubic-bezier(0.23, 1, 0.32, 1);
    background: #fff;
}

/* 转盘指针 */
.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.pointer {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 25px solid #d63384;
    filter: drop-shadow(0 2px 4px rgba(214, 51, 132, 0.3));
}

/* 控制区域 */
.controls {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(214, 51, 132, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.input-section {
    margin-bottom: 25px;
}

.input-section h3,
.default-foods h3 {
    font-size: 1.1rem;
    color: #d63384;
    margin-bottom: 15px;
    font-weight: 600;
}

.input-group {
    display: flex;
    gap: 10px;
}

#customFood {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #f8d7da;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

#customFood:focus {
    border-color: #d63384;
    box-shadow: 0 0 0 3px rgba(214, 51, 132, 0.1);
}

.btn-add {
    padding: 12px 20px;
    background: linear-gradient(135deg, #d63384, #e91e63);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(214, 51, 132, 0.3);
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(214, 51, 132, 0.4);
}

.btn-add:active {
    transform: translateY(0);
}

/* 默认菜品标签 */
.food-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.food-tag {
    padding: 8px 16px;
    background: linear-gradient(135deg, #ffc1cc, #ffb3c1);
    color: #8b5a6b;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 193, 204, 0.3);
}

.food-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 204, 0.5);
    background: linear-gradient(135deg, #ffb3c1, #ffa8b8);
}

.food-tag.selected {
    background: linear-gradient(135deg, #d63384, #e91e63);
    color: white;
    box-shadow: 0 4px 15px rgba(214, 51, 132, 0.4);
}

/* 抽奖按钮 */
.spin-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #d63384, #e91e63);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(214, 51, 132, 0.3);
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spin-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(214, 51, 132, 0.4);
}

.spin-button:active {
    transform: translateY(-1px);
}

.spin-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-emoji {
    font-size: 1.4rem;
    animation: bounce 2s infinite;
}

/* 结果显示 */
.result-section {
    display: none;
    animation: fadeInUp 0.6s ease-out;
}

.result-section.show {
    display: block;
}

.result-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(214, 51, 132, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 25px;
}

.result-card h3 {
    color: #d63384;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.result-food {
    font-size: 2rem;
    font-weight: 700;
    color: #d63384;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(214, 51, 132, 0.1);
}

.result-time {
    font-size: 0.9rem;
    color: #8b5a6b;
    opacity: 0.8;
}

/* 历史记录 */
.history-section {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(214, 51, 132, 0.1);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.history-section h3 {
    color: #d63384;
    font-size: 1.1rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.last-result p {
    color: #8b5a6b;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 动画效果 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .wheel-wrapper {
        width: 250px;
        height: 250px;
    }
    
    .controls {
        padding: 20px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .btn-add {
        align-self: stretch;
    }
    
    .food-tags {
        justify-content: center;
    }
}

@media (max-width: 360px) {
    .wheel-wrapper {
        width: 220px;
        height: 220px;
    }
    
    .title {
        font-size: 1.6rem;
    }
    
    .controls {
        padding: 15px;
    }
}